<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>公告列表 - Powered By Betou</title>
<meta name="author" content="Betou Team" />
<meta name="copyright" content="Betou" />
<#include "../head_list.html"/>
<script type="text/javascript">
$().ready(function() {
	<#if pagination.totalCount==0>
		$.message("warn", "暂无数据！");
	</#if>

	var $listForm = $("#listForm");
	var $filterSelect = $("#filterSelect");
	var $filterOption = $("#filterOption a");
	
	$filterSelect.mouseover(function() {
		var $this = $(this);
		var offset = $this.offset();
		var $menuWrap = $this.closest("div.menuWrap");
		var $popupMenu = $menuWrap.children("div.popupMenu");
		$popupMenu.css({left: offset.left, top: offset.top + $this.height() + 2}).show();
		$menuWrap.mouseleave(function() {
			$popupMenu.hide();
		});
	});
	
	$filterOption.click(function() {
		var $this = $(this);
		var $dest = $("#" + $this.attr("name"));
		if ($this.hasClass("checked")) {
			$dest.val("");
		} else {
			$dest.val($this.attr("val"));
		}
		$listForm.submit();
		return false;
	});
	var filterStatus = '${filterStatus!}';
	$.each($filterOption,function(i,e){
		var $this = $(this);
		if( $this.attr("val") == filterStatus ){
			$this.addClass('checked');
		}
	})
});
</script>
</head>
<body class="content">
	<div class="path">
		<a href="../index.jspx">首页</a> &raquo; 公告列表 <span>(共<span id="pageTotal">${pagination.totalCount!0}</span>条记录)</span>
	</div>
	<form id="listForm"  class="clearfix" action="v_list.jspx?view=notice" method="post">
		<div class="bar">
			<div class="buttonWrap">
				<#include "../pageselect.html"/>
			</div>
			<div class="menuWrap">
				<div class="search">
					<span id="searchPropertySelect" class="arrow">&nbsp;</span>
					<input type="text"  id="searchValue" name="searchValue" value="${searchValue!}" maxlength="200" />
					<button type="submit">&nbsp;</button>
				</div>
				<div class="popupMenu">
					<ul id="searchPropertyOption">
						<li><a href="javascript:;" val="title">标题</a></li>
						<#if admin.system>
							<li><a href="javascript:;" val="admin.username">发布者</a></li>
						</#if>
					</ul>
				</div>
			</div>
		</div>
		<table id="listTable" class="list">
			<tr>
				<th class="check"><input type="checkbox" id="selectAll" /></th>
				<th><a href="javascript:;" class="sort" name="title">标题</a></th>
				<th><a href="javascript:;" class="sort" name="addDate">发布日期</a></th>
				<th><a href="javascript:;" class="sort" name="admin.id">发布者</a></th>
				<th><a href="javascript:;" class="sort" name="noticeType.id">类别</a></th>
				<th><span>操作</span></th>
			</tr>
			<#list pagination.list as c>
				<tr>
					<td><input type="checkbox" name="ids"  title=""  value="${c.id!}" /></td>
					<td>
						<#if c.admin.id == admin.id>
						<span class="blue" title="我发布的公告">${c.title!}</span>
						<#else>
						${c.title!}
						</#if>
					</td>	
					<td>
						<span title="${c.addDate?string('yyyy-MM-dd hh:mm:ss')}">${c.addDate?string('yyyy-MM-dd')}</span>
					</td>
					<td><span class="green">${c.admin.username!}</span></td>
					<td>
						<#if c.noticeType.identity == 's'>
							<span class="red">${c.noticeType.name!}</span>
						<#else>
							<span class="blue">${c.noticeType.name!}</span>
						</#if>
					</td>
					<td><a href="../notice/v_edit.jspx?id=${c.id!}">[查看]</a></td>
				</tr>
			</#list>
		</table>
		<#include "../list_hidden.html" />
		<#include "../page.html" />
	</form>
	<#include "../footer.html"/>
</body>
</html>